Skip to content

Conversation

helenul
Copy link
Member

@helenul helenul commented Nov 22, 2026

My Matches gets the same search, filters and match counts as Explore Plants, and both pages can now also sort by the user's preferences.

Search and filters on My Matches

  • Search, the three filters with match counts, disabled empty values and reset, like on Explore
  • The choices are kept in sessionStorage, like the sort order already was. The matches belong to the user in this browser, so a URL that could be shared would not help
  • Backend: myMatches takes the same search and filter arguments as explorePlants, and counts only among the user's matches. Both use the same findPlantPage and PlantPage type
  • Shared PlantSearchForm component, so Explore and My Matches look and work the same, and the filters are defined once in plantFilters.ts
  • Empty states in the pink box, like on Explore: "None of your matches fit…" under the filters, and "You have no matches yet" when there are none. No "no matches" flash while the list loads after Reset

Sort by preferences

  • New "Best match first" sort order on Explore and My Matches, with the same score as Plant Match. Plants that match equally well are sorted by name
  • Only offered when the user has chosen preferences. A saved sort by preferences without preferences falls back to the default order

Smaller fixes

  • The page scrolls to the top when going to another page, so the top of the new page (like the number of matches) is not hidden
  • .visually-hidden is global, so hidden text also works on pages opened before Explore
  • The walkthrough E2E test finds elements by role and name instead of CSS classes, like the other UI tests (follow-up to replace CSS class locators in E2E tests with role-based locators #145)

Tests

  • Backend: filtering, searching and counting in myMatches, and sorting by preferences on both
  • Component: search, filters, empty states, reset and best match first on My Matches; best match first on Explore; scrolling in App
  • E2E: searching and filtering My Matches, and the choices remembered on another page and back

@helenul helenul requested a review from a team as a code owner November 22, 2026 18:19
@helenul helenul linked an issue Nov 22, 2026 that may be closed by this pull request
4 tasks
@helenul helenul self-assigned this Nov 22, 2026
Copy link
Member

@alexajah alexajah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

veldig mye bra! Eneste er om man skulle tenkt på å style my matches siden ulikt fra explor siden for nå ser de veldig like ut, eksempelvis kunne man gjort explore page mere grønn og beholdt my matches rosa

@helenul helenul requested a review from alexajah November 23, 2026 09:14
Copy link
Member

@alexajah alexajah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good after changes!

@helenul helenul merged commit 2ffbbc5 into main Nov 23, 2026
0 of 4 checks passed
@helenul helenul deleted the 151-add-filtering-on-mymatchespage branch November 23, 2026 09:18
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add filtering on MyMatchesPage
2 participants